package com.example.kuaizu.email;

import kuaizu.common.tablepojo.Project;
import org.springframework.stereotype.Component;

/**
 * 邮件推广功能
 */
@Component
public class EmailPromotion {
    private String emailTextMode;//邮件模版
    private String toEmail;//收件人地址
    private String toEmailName;//收件人名字
    private String emailText;//自定义邮件内容

    public EmailPromotion(String emailTextMode, String toEmail, String toEmailName, String emailText) {
        this.emailTextMode = emailTextMode;
        this.toEmail = toEmail;
        this.toEmailName = toEmailName;
        this.emailText = emailText;
    }

    public EmailPromotion() {
    }

    public String getEmailTextMode() {
        return emailTextMode;
    }

    public void setEmailTextMode(String emailTextMode) {
        this.emailTextMode = emailTextMode;
    }

    public String getToEmail() {
        return toEmail;
    }

    public void setToEmail(String toEmail) {
        this.toEmail = toEmail;
    }

    public String getToEmailName() {
        return toEmailName;
    }

    public void setToEmailName(String toEmailName) {
        this.toEmailName = toEmailName;
    }

    public String getEmailText() {
        return emailText;
    }

    public void setEmailText(String emailText) {
        this.emailText = emailText;
    }


    public String sendEmailText(String toEmailName, Project project) {
        return "\"Hi " + toEmailName + "：<br>" +
                "            \"你好呀！<br>" +
                "            \"「快组」正式向你发出邀请 ——" + project.getProjectName() + "项目团队，一起冲击荣誉、打磨作品" +
                "            \"简单同步关键信息：<br>" +
                "            \"✅ 项目信息：" + project.getProjectInfo() + "<br>" +
                "            \"✅ 技能要求：" + project.getSkillDetails() + "；<br>" +
                //"            \"✅ 基础规划：近期会启动 [阶段任务，如 “需求脑暴会 / 技术方案研讨”]，后续每周 [X] 晚 [X] 点同步进度，保证高效推进～\\n\" +\n" +
                "            \"现在需要你做个小决定：<br>" +
                "            \"◉ 同意加入 →  “点击跳转微信小程序”我们会第一时间拉你进项目沟通群；<br>" +
                "            \"◉ 拒绝加入 →  “拒绝” 即可，也感谢你考虑，期待未来有缘再合作～<br>";
    }

}
